package flag

import (
	"software/global"
	"software/models"
)

func MakeMigrations() {
	var err error

	global.DB.Set("gorm:table_options", "charset=utf8mb4").AutoMigrate(&models.Admin{}, &models.User{}, &models.Photo{})
	if err != nil {
		global.Log.Error("[error]生成数据库表失败")
	}
	global.Log.Info("[success] 生成数据库表成功")
}
